﻿<%@ Page Title="" Language="C#" MasterPageFile="~/WebmasterTool/Admin.Master" AutoEventWireup="true"
    CodeBehind="Categories.aspx.cs" Inherits="Framework.WebmasterTool.GalleryImages.Categories" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script>
        $(document).ready(function () {
            $("#<%= btnDelete.ClientID %>").live("click", function () {
                var callFrom = $(this);
                jConfirm('Chắc chắn xoá?', 'Digisky Confirm Dialog',
                            function (r) {
                                if (r) {
                                    __doPostBack(callFrom.attr('name').replace(/_/g, '$'), '');
                                }
                            });
                return false;
            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ctlCaption" runat="Server">
    Danh mục thư viện ảnh
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="PageContent" runat="Server">
    <asp:Label ID="lblPermissionMessage" runat="server" Font-Bold="true" ForeColor="Red"
        Text="Tài khoản không có quyền truy cập vào trang này" Visible="false"></asp:Label>
    <asp:Panel ID="Panel1" runat="server" Visible="true">
        <table border="0" cellpadding="0" cellspacing="10" width="100%">
            <tr>
                <td valign="top" colspan="2" align="center">
                    <asp:ValidationSummary ID="ValidationSummary1" runat="server" Font-Bold="true" DisplayMode="List"
                        ValidationGroup="Categories" />
                    <asp:Label runat="server" ID="lblMsg" ForeColor="red" Font-Bold="true"></asp:Label>
                </td>
            </tr>
            <tr>
                <td valign="top" colspan="2" align="right">
                    <asp:Button ID="btnGalleryImage" runat="server" Text="Quản lý ảnh" OnClick="btnGalleryImage_Click" />
                </td>
            </tr>
            <tr>
                <td valign="top" style="padding: 10px; background: #f5f5f5; border: solid 1px #ccc;
                    width: 300px">
                    <asp:TreeView ID="trvCategories" runat="server" ImageSet="Arrows" Font-Names="verdana"
                        Font-Size="12px" Width="280px">
                        <Nodes>
                            <asp:TreeNode Text="All Items" SelectAction="Expand" Value="All Items" />
                        </Nodes>
                        <SelectedNodeStyle Font-Underline="True" HorizontalPadding="0px" VerticalPadding="0px"
                            Font-Bold="True"></SelectedNodeStyle>
                        <ParentNodeStyle Font-Bold="False" ForeColor="#555555" />
                        <RootNodeStyle Font-Bold="true" />
                        <NodeStyle Font-Names="Verdana" Font-Size="12px" ForeColor="Black" HorizontalPadding="5px"
                            NodeSpacing="0px" VerticalPadding="5px"></NodeStyle>
                        <HoverNodeStyle Font-Underline="True" ForeColor="#5555DD"></HoverNodeStyle>
                    </asp:TreeView>
                </td>
                <td valign="top">
                    <table border="0" cellpadding="2" align="center" style="padding: 10px; background: #f5f5f5;
                        border: solid 1px #ccc; width: 100%">
                        <tr>
                            <td align="right" style="width: 100px;">
                                <b>Loại danh mục: </b>
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlCategories" runat="server" DataTextField="Title" DataValueField="CateID"
                                    AppendDataBoundItems="true" Width="250px">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <b>Tên danh mục: </b>
                            </td>
                            <td>
                                <asp:TextBox ID="txtCateName" runat="server" Width="250" MaxLength="700"></asp:TextBox>
                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" ControlToValidate="txtCateName"
                                    ErrorMessage="Chưa nhập tên danh mục" Display="Dynamic" ValidationGroup="Categories">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <b>Tên(en): </b>
                            </td>
                            <td>
                                <asp:TextBox ID="txtCateName_en" runat="server" Width="250" MaxLength="700"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td valign="middle" align="right">
                                <b>Chi tiết: </b>
                            </td>
                            <td>
                                <CKEditor:CKEditorControl ID="txtDesciption" runat="server" UIColor="#CED9F3" Width="300"
                                    Height="200" Toolbar="Basic" BasePath="/Plugins/Ckeditor" ContentsCss="/Plugins/Ckeditor/contents.css"
                                    TemplatesFiles="/Plugins/Ckeditor/plugins/templates/templates/default.js">
                                </CKEditor:CKEditorControl>
                            </td>
                        </tr>
                        <tr>
                            <td valign="middle" align="right">
                                <b>Chi tiết(en): </b>
                            </td>
                            <td>
                                <CKEditor:CKEditorControl ID="txtDesciption_en" runat="server" UIColor="#CED9F3"
                                    Width="300" Height="200" Toolbar="Basic" BasePath="/Plugins/Ckeditor" ContentsCss="/Plugins/Ckeditor/contents.css"
                                    TemplatesFiles="/Plugins/Ckeditor/plugins/templates/templates/default.js">
                                </CKEditor:CKEditorControl>
                            </td>
                        </tr>
                        <tr>
                            <td valign="middle" align="right">
                                <b>Meta Description: </b>
                            </td>
                            <td>
                                <asp:TextBox ID="txtMetaDescription" runat="server" Width="250" Height="100" TextMode="MultiLine"
                                    Rows="3" MaxLength="700"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td valign="middle" align="right">
                                <b>Meta Keywords: </b>
                            </td>
                            <td>
                                <asp:TextBox ID="txtMetaKeywords" runat="server" Width="250" Height="100" TextMode="MultiLine"
                                    Rows="3" MaxLength="700"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <b>Sắp xếp:</b>
                            </td>
                            <td>
                                <asp:TextBox ID="txtCateOrder" Font-Bold="true" runat="server" Width="138px" Text="0"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Chưa nhập vị trí cho danh mục"
                                    ControlToValidate="txtCateOrder" ValidationGroup="Categories" Display="Dynamic">*</asp:RequiredFieldValidator>
                                <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="txtCateOrder"
                                    Type="Integer" MinimumValue="0" MaximumValue="9999" ValidationGroup="Categories"
                                    ErrorMessage="Vị trí danh mục phải từ 0 đến 9999" Display="Dynamic">*</asp:RangeValidator>
                            </td>
                        </tr>
                        <tr>
                            <td valign="top">
                                <b></b>
                            </td>
                            <td>
                                <asp:CheckBox ID="chkIsActive" runat="server" Checked="true" Width="250" Text="Hiển thị danh mục" />
                            </td>
                        </tr>
                        <tr>
                            <td valign="top">
                                <b></b>
                            </td>
                            <td>
                                <asp:CheckBox ID="chkCateTop" runat="server" Width="250" Text="Danh mục nổi bật"
                                    Visible="true" />
                            </td>
                        </tr>
                        <tr>
                            <td valign="middle" align="right">
                                <b>Phân trang: </b>
                            </td>
                            <td>
                                <asp:TextBox ID="txtPaging" Font-Bold="true" runat="server" Width="138px" Text="1"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="Chưa nhập phân trang (số bài viết trên 1 trang) cho danh mục"
                                    ControlToValidate="txtPaging" ValidationGroup="Categories" Display="Dynamic">*</asp:RequiredFieldValidator>
                                <asp:RangeValidator ID="RangeValidator2" runat="server" ControlToValidate="txtPaging"
                                    Type="Integer" MinimumValue="1" MaximumValue="100" ValidationGroup="Categories"
                                    ErrorMessage="Phân trang (số bài viết trên 1 trang) phải từ 1 đến 100" Display="Dynamic">*</asp:RangeValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <b>Ngày tạo: </b>
                            </td>
                            <td>
                                <asp:Label ID="lblAddedDate" runat="server" Text="None"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <b>Người tạo: </b>
                            </td>
                            <td>
                                <asp:Label ID="lblAddedBy" runat="server" Text="None"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <b>Ngày update: </b>
                            </td>
                            <td>
                                <asp:Label ID="lblUpdatedDate" runat="server" Text="None"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <b>Người update: </b>
                            </td>
                            <td>
                                <asp:Label ID="lblUpdatedBy" runat="server" Text="None"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" colspan="2" valign="middle">
                                <asp:Button ID="btnSave" runat="server" Text="Lưu" ValidationGroup="Categories" Width="80px"
                                    OnClick="btnSave_Click"></asp:Button>
                                <asp:Button ID="btnNew" runat="server" Text="Thêm mới" Visible="false" Width="80px"
                                    OnClick="btnNew_Click"></asp:Button>
                                <asp:Button ID="btnDelete" runat="server" Text="Xóa" Visible="false" Width="80px"
                                    OnClick="btnDelete_Click"></asp:Button>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </asp:Panel>
</asp:Content>
